import Vue from 'vue'
import VueRouter from 'vue-router'

let Home = () =>
    import ('../views/home/home.vue')
let Homes = () =>
    import ('../views/home/homes.vue')


Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: '首页',
        component: Home,
        meta: { index: 0 },
        children: [{
                path: '/',
                component: Homes,
            },
            {
                path: '/OrderUser',
                name: '下单用户',
                meta: { index: 1 },
                component: () =>
                    import ('../views/OrderUser/OrderUser.vue'),
            },
            {
                path: '/Sensitivity',
                name: '敏感词库',
                meta: { index: 2 },
                component: () =>
                    import ('../views/Sensitivity/Sensitivity.vue')
            },
            {
                path: '/StoreInformation',
                name: '店铺信息',
                meta: { index: 3 },
                component: () =>
                    import ('../views/StoreInformation/StoreInformation.vue')
            },
            {
                path: '/Account',
                name: '账号管理',
                meta: { index: 4 },
                component: () =>
                    import ('../views/Account/Account.vue')
            },
            {
                path: '/Brand',
                name: '品牌管理',
                meta: { index: 5 },
                component: () =>
                    import ('../views/Brand/Brand.vue')
            },
            {
                path: '/Decorate',
                name: '店铺装修',
                meta: { index: 6 },
                component: () =>
                    import ('../views/Decorate/Decorate.vue')
            },
            {
                path: '/CssAdmin',
                name: '分类管理',
                meta: { index: 7 },
                component: () =>
                    import ('../views/CssAdmin/CssAdmin.vue')
            },
            {
                path: '/GoodsList',
                name: '商城列表',
                meta: { index: 8 },
                component: () =>
                    import ('../views/shoppinggoods/shoppinggoods.vue')
            },
            {
                path: '/AddGoods',
                name: '添加新商品',
                meta: { index: 9 },
                component: () =>
                    import ('../views/AddGoods/AddGoods.vue')
            },
            {
                path: '/Recycle',
                name: '商品品牌',
                meta: { index: 10 },
                component: () =>
                    import ('../views/Recycle/Recycle.vue')
            },
            {
                path: '/Inventory',
                name: '商品分类',
                meta: { index: 11 },
                component: () =>
                    import ('../views/goodsClass/goodsClass.vue')
            },
            {
                path: '/Custom',
                name: '自定义规格',
                meta: { index: 12 },
                component: () =>
                    import ('../views/Custom/Custom.vue')
            },
            {
                path: '/customList',
                name: '自定义规格列表',
                meta: { index: 13 },
                component: () =>
                    import ('../views/customList/customList.vue')
            },
            {
                path: '/Logistics',
                name: '物流设置',
                meta: { index: 14 },
                component: () =>
                    import ('../views/Logistics/Logistics.vue')
            },
            {
                path: '/LogisticsTemplate',
                name: '物流模板',
                meta: { index: 15 },
                component: () =>
                    import ('../views/LogisticsTemplate/LogisticsTemplate.vue')
            },
            {
                path: '/OrderClass',
                name: '订单列表',
                meta: { index: 16 },
                component: () =>
                    import ('../views/OrderClass/OrderClass.vue')
            },
            {
                path: '/SalesOrder',
                name: '售后订单',
                meta: { index: 17 },
                component: () =>
                    import ('../views/SalesOrder/SalesOrder.vue')
            },
            {
                path: '/orderDetails/:id',
                name: '订单详情',
                meta: { index: 18 },
                component: () =>
                    import ('../views/orderDetails/orderDetails.vue')
            },
            {
                path: '/GroupOrder',
                name: '拼团订单',
                meta: { index: 19 },
                component: () =>
                    import ('../views/GroupOrder/GroupOrder.vue')
            },
            {
                path: '/RetiredList',
                name: '退单列表',
                meta: { index: 20 },
                component: () =>
                    import ('../views/RetiredList/RetiredList.vue')
            },
            {
                path: '/ChargebackDetails/:id',
                name: '退货详情',
                meta: { index: 21 },
                component: () =>
                    import ('../views/ChargebackDetails/ChargebackDetails.vue')
            },

        ]
    }

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router